<?php

session_start();
include 'funktionen.inc.php';
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="cs">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=windows-1250">
    <meta name="generator" content="PSPad editor, www.pspad.com">
     <link rel="stylesheet" type="text/css" href="css/css.css">
   <title>Frontend - Datei anzeigen</title>
  </head>
  <body>
      <h1>Frontend - Datei anzeigen</h1>';
include 'header.php';

echo "test<br>";

$sql="SELECT `id`,`comm` FROM `tasks` WHERE `comm` != ''";
$result= mysql_query($sql) or die(mysql_error());

while ($line = mysql_fetch_array($result)) {
	echo $line[id].": ".$line[comm]."<br>";

	$sql2="INSERT INTO `comments` ( `id` , `user_id` , `task_id` , `time` , `text` ) VALUES (NULL , '39', '".$line[id]."', NOW( ) , '".$line[comm]."');";
	$result2= mysql_query($sql2) or die(mysql_error());
}

include 'footer.php';
echo '</body></html>';
?>